﻿using System;
using System.Diagnostics.Contracts;
using EuroManager.Domain.Simulator.Engine;
using EuroManager.Domain.Simulator.World;

namespace EuroManager.Domain.Simulator.Tactics
{
    [ContractClass(typeof(PlayerTacticsContract))]
    public interface IPlayerTactics
    {
        Vector2D CalculateKickOffLocation(IPitch pitch, PitchSide side);

        Vector2D CalculateTacticalLocation(IPitch pitch, PitchSide side, Vector2D ballLocation);
    }

    [ContractClassFor(typeof(IPlayerTactics))]
    public abstract class PlayerTacticsContract : IPlayerTactics
    {
        public Vector2D CalculateKickOffLocation(IPitch pitch, PitchSide side)
        {
            Contract.Requires(pitch != null);
            return Vector2D.Zero;
        }

        public Vector2D CalculateTacticalLocation(IPitch pitch, PitchSide side, Vector2D ballLocation)
        {
            Contract.Requires(pitch != null);
            return Vector2D.Zero;
        }
    }
}
